package com.pajk.user.api.http;

import org.testng.Assert;
import org.testng.annotations.Test;

import com.pajk.test.api.BaseTest;
import com.pajk.test.client.ContextHelper;
import com.pingan.jk.api.request.ApiCode;
import com.pingan.jk.api.request.User_RenewUserToken;
import com.pingan.jk.api.resp.Api_USER_LoginResp;
import com.pingan.jk.client.ApiContext;
import com.pingan.jk.client.BaseRequest;

public class User_RenewUserTokenIT extends BaseTest {
	@Test(description="user.renewUserToken 更新用户Token SecurityType.RegisteredDevice")
	public void resetPasswordTest(){
		
		ApiContext context = super.registerDevice();
		
		User_RenewUserToken req = new User_RenewUserToken();
		ContextHelper.sendRequest(context, new BaseRequest[] { req });
		Assert.assertEquals(req.getReturnCode() , ApiCode.SUCCESS);
		
		Api_USER_LoginResp res = req.getResponse();
		Assert.assertNotNull(res);
		System.out.println(res.expire);
		System.out.println(res.token);
		System.out.println(res.uid);
	}
}
